﻿using System;

class CatalanNumbers
{
    static void Main(string[] args)
    {
        //(2n)! / (n+1)!n!
        Console.Write("N=");
        int n = int.Parse(Console.ReadLine());
        Console.WriteLine();
        decimal fact2n = 1;
        for (int i = 1; i <= 2*n; i++)
        {
            if (i == 2 * n)
            {
                fact2n *= i;
                Console.Write("{0} = {1}", i, fact2n);
            }
            else
            {
                fact2n *= i;
                Console.Write("{0} * ", i);
            }
        }
        Console.WriteLine();
        decimal factnplus = 1;
        for (int i = 1; i <=n+1; i++)
        {
            if (i == n+1)
            {
                factnplus *= i;
                Console.Write("{0} = {1}", i, factnplus);
            }
            else
            {
                factnplus *= i;
                Console.Write("{0} * ", i);
            }
        }
        Console.WriteLine();
        decimal factn = 1;
        for (int i = 1; i <= n; i++)
        {
            if (i == n )
            {
                factn *= i;
                Console.Write("{0} = {1}", i, factn);
            }
            else
            {
                factn *= i;
                Console.Write("{0} * ", i);
            }
        }
        Console.WriteLine();
        Console.WriteLine("Fact 2n {0}",fact2n);
        Console.WriteLine("Fact n+1 {0}",factnplus);
        Console.WriteLine("Fact n! {0}",factn);
        Console.WriteLine("Fact (n+1)!n! {0}", factnplus * factn);
        Console.WriteLine("Result (2n)!/(n+1)!n! = {0}", fact2n / (factnplus * factn));
    }
}

